home *** CD-ROM | disk | FTP | other *** search
- % Copyright (C) 1996, 1997 Aladdin Enterprises. All rights reserved.
- %
- % This file is part of AFPL Ghostscript.
- %
- % AFPL Ghostscript is distributed with NO WARRANTY OF ANY KIND. No author or
- % distributor accepts any responsibility for the consequences of using it, or
- % for whether it serves any particular purpose or works at all, unless he or
- % she says so in writing. Refer to the Aladdin Free Public License (the
- % "License") for full details.
- %
- % Every copy of AFPL Ghostscript must include a copy of the License, normally
- % in a plain ASCII text file named PUBLIC. The License grants you the right
- % to copy, modify and redistribute AFPL Ghostscript, but only under certain
- % conditions described in the License. Among other things, the License
- % requires that the copyright notice and this notice be preserved on all
- % copies.
-
- % $Id: pdf_sec.ps,v 1.2 2000/09/19 18:29:11 lpd Exp $
- % pdf_sec.ps
- % Security hooks for PDF reader.
-
- % This file contains the procedures that have to take encryption into
- % account when reading a PDF file. There is no actual decryption code here,
- % because U.S. export control laws might prohibit making this file available
- % to anyone outside the U.S. if the code were included. Instead, you can
- % get the real version of this file from
- % http://www.ozemail.com.au/~geoffk/pdfencrypt/pdf_sec.ps
- % or, if the ~ character upsets your software,
- % http://www.ozemail.com.au/%7Egeoffk/pdfencrypt/pdf_sec.ps
- % NOTE: these URLs are referenced in the error message below.
-
- /.setlanguagelevel where { pop 2 .setlanguagelevel } if
- .currentglobal true .setglobal
- /pdfdict where { pop } { /pdfdict 100 dict def } ifelse
- pdfdict begin
-
- % Process the encryption information in the Trailer.
- /pdf_process_Encrypt
- { (\n) =
- ( **** The PDF input file uses encryption and cannot be processed.) =
- ( **** Please get and install the patch available from) =
- ( **** http://www.ozemail.com.au/~geoffk/pdfencrypt/pdf_sec.ps) =
- (\n) = flush
- /pdfopen cvx /invalidfileaccess signalerror
- } bind def
-
- % Run the code to resolve an object reference.
- /pdf_run_resolve
- { PDFfile resolveopdict .pdfrun
- } bind def
-
- % Prefix a decryption filter to a stream if needed.
- % Stack: readdata? dict parms file/string filternames
- /pdf_decrypt_stream
- {
- } bind def
-
- end % pdfdict
- .setglobal
-